1. Field of the Invention
The present invention is directed to a method and apparatus for maintaining coherence among multiple copies of a database shared by multiple computers. The invention may be used, for example, in a system in which multiple Web servers, each having a respective copy of a database, together form a single virtual Web server on the Internet, and in which it is desirable to maintain coherence among the multiple copies of the database.
2. Discussion of Related Art
As the Internet has become increasingly popular, greater numbers of Web sites are being added to the Internet each day. A Web site is typically implemented by a so called Web server that is connected to the Internet and has a particular Web site address. The Web site is accessed by users designating the appropriate address for the Web site, which results in a connection being formed through the Internet between the user and the Web site.
As will be appreciated by those skilled in the art, a Web server is typically implemented via a computer that executes an application program that performs the desired functions for the Web server. An example of a typical Web server 100 is shown in FIG. 1. As shown, the Web server 100 includes a processor 104, a memory 106, and a network interface unit 110 that interfaces the Web server to the Internet or other network cloud 114. The network interface unit 110 permits one or more network users 116 to communicate with the Web server 100 over the network cloud 114. The processor 104 executes an application program stored in the memory 106 to perform the functions of the Web server. These functions will vary depending upon the type of Web site that the Web server implements. For example, the Web server 100 may respond to requests from the network users 116, and/or permit the network users to access Web site data stored (e.g., in a database) in the memory 106, or in a storage system 118 coupled to the processor 104 by a link 112. The Web server 100 may also include one or more user input devices 108 (e.g., a keyboard and/or mouse) and a display 102 to permit a local user (e.g., a system administrator) to access to the Web server 100.
Some Web sites have become extremely popular and service numerous user accesses per day. For particularly busy Web sites, a single Web server 100 (FIG. 1) would not provide sufficient bandwidth to service the heavy traffic of user requests, so that at times some users would be unable to access the Web site. It should be appreciated that this is undesirable, particularly for certain types of Web sites. For example, for a Web site run by a commercial enterprise that conducts business over the Internet, the enterprise may experience a loss of business and revenue if its Web site is unavailable for users who desire access at any particular time.
To address the foregoing concern, some Web sites have been implemented using multiple Web servers performing in parallel, such that requests from users can be routed to the multiple Web servers and serviced simultaneously. Typically, the multiple Web servers can be distributed across a wide geographic area (e.g., on different continents) to maximize the overall performance of the Web site. An example of a Web site implemented with multiple Web servers 100a-b is shown in FIG. 2. In the illustrative example shown in FIG. 2, each of the multiple Web servers 100a-b is coupled to a plurality of users 116a-b via a network cloud 114. The Web servers 100a-b are respectively coupled to storage systems 118a-b that store data used by the Web servers. Each of the Web servers 100a-b is capable of independently implementing the Web site in much the same manner as the above-described system of FIG. 1. However, by providing multiple Web servers 100a-b, the performance of the Web site is improved because the Web servers 100a-b can process accesses from the users 116a-b in parallel.
It should be appreciated that when multiple Web servers 100a-b are employed to implement a Web site, some technique should be employed to route each specific user access to one of the Web servers 100a-b, so that the multiple Web servers 100a-b appear to the Web site users as a single virtual Web server. In the illustrative system shown in FIG. 2, this function is performed by the load balancers 206a-b, which are respectively coupled between the network cloud 114 and the Web servers 100a-b. Such load balancing devices are commercially available. For example, one such load balancer is the CISCO Local Director, available from CISCO Systems, Inc., headquartered in San Jose, California.
As mentioned above in connection with FIG. 1, a Web server 100 may include a collection of data (e.g., in a database) that is employed in implementing the Web site and servicing user accesses. In a system such as that shown in FIG. 2 wherein multiple Web servers 100a-b are provided, it should be appreciated that the database used to implement the Web site is typically replicated. Thus, one copy of the database is stored in the storage system 118a accessible to Web server 100a, and another copy is stored in the storage system 118b accessible to Web server 100b. It should be appreciated that the Web site should operate consistently irrespective of which of the Web servers 100a-b a user request is routed to. Thus, it desirable to ensure that the copies of the Web site database stored on storage systems 118a and 118b are identical. It should further be appreciated that for numerous Web sites, the database will frequently be updated based upon user accesses. Thus, some technique should be provided for maintaining coherence between the multiple copies of the database distributed amongst the storage systems 118a-b. 
In conventional systems such as that shown in FIG. 2, coherence between multiple copies of the Web site database is maintained by the Web servers 100a-b, often under the control of a system administrator. For example, when the copy of the database stored on storage system 118a is updated, the Web server 100a will retrieve the updated data from its copy of the database and transfer the updated data, through the network cloud 114, to the Web server 100b, which will then update its copy of the database stored in storage system 118b accordingly. Thus, coherence between the databases is maintained by transferring updated data through the Web servers and the network cloud 114.
One illustrative embodiment of the present invention is directed to a method to be employed in a computer system including first and second computers and first and second storage systems, wherein the first storage system is coupled to the first computer to store data transferred from the first computer to the first storage system and the second storage system is coupled to the second computer to store data transferred from the second computer to the second storage system. The method is for updating data stored on at least one of the first and second storage systems, and includes steps of: (A) updating a first logical volume of data stored on the first storage system with a first set of data transferred from the first computer to the first storage system; (B) receiving, at the first storage system, a second set of data transmitted from the second storage system to the first storage system via at least one communication path that does not pass through the first computer; and (C) updating the first logical volume of data with the second set of data transmitted from the second storage system.
Another illustrative embodiment of the present is directed to a method to be used in a computer system including first and second computers and first and second storage systems, wherein the first storage system is coupled to the first computer to store data transferred from the first computer to the first storage system and the second storage system is coupled to the second computer to store data transferred from the second computer to the second storage system. The method is for managing data stored on at least one of the first and second storage systems, and includes steps of: (A) in response to a first logical volume of data stored on the first storage system being updated with a first set of data transferred from the first computer to the first storage system, transmitting the first set of data from the first storage system to the second storage system over at least one communication path that does not pass through either of the first and second computers; (B) receiving, at the first storage system, a second set of data transmitted over the at least one communication path by the second storage system; and (C) updating the first logical volume with the second set of data transmitted over the at least one communication path.
Another illustrative embodiment of the present invention is directed to a method to be used in a computer system including first and second computers and first and second storage systems, wherein the first storage system is coupled to the first computer to store data transferred from the first computer to the first storage system and the second storage system is coupled to the second computer to store data transferred from the second computer to the second storage system. The method is for maintaining coherence between a data set shared by the first and second computers and stored on the first and second storage systems, and includes steps of: (A) updating the data set in the first storage system with a first group of data written to the first storage system by the first computer; (B) receiving, at the first storage system, a second group of data that is sourced from the second storage system via at least one communication path that does not pass through the first computer; and (C) overwriting at least a portion of the first group of data in the first storage system with at least a portion of the second group of data received from the second storage system.
Another illustrative embodiment of the present invention is directed to a method to be used in a computer system including first and second computers and first and second storage systems, wherein the first storage system is coupled to the first computer to store data transferred from the first computer to the first storage system and the second storage system is coupled to the second computer to store data transferred from the second computer to the second storage system. The method is for maintaining coherence between first and second copies of a data set stored, respectively, on the firsthand second storage systems, and includes steps of: (A) in response to a first group of data being written to the first copy of the data set by the first computer, transmitting the first group of data from the first storage system to the second storage system over at least one communication path that does not pass through the first computer so that the first group of data can be stored on the second storage system; (B) receiving at the first storage system, via the at least one communication path, a second group of data written to the second copy of the data set by the second computer; and (C) overwriting at least a portion of the first group of data in the first storage system with at least a portion of the second group of data.
Another illustrative embodiment of the present invention is directed to a computer system including: a first computer; a first storage system coupled to the first storage system to store data accessible to the first computer, the first storage system including at least one storage device that stores a first plurality of logical volumes of data that are visible to and writable by the first computer; a second computer; a second storage system coupled to the second computer to store data accessible to the second computer, the second storage system including at least one storage device that stores a second plurality of logical volumes of data that are visible to and writable by the second computer; at least one communication path coupled between the first and second storage systems to transfer data between the first and second storage systems, the at least one communication path not passing through the first computer; and at least one controller that mirrors one of the first plurality of logical volumes in one of the second plurality of logical volumes by transmitting updates from the first computer to the one of the first plurality of logical volumes to the one of the second plurality of logical volumes over the at least one communication path.
Another illustrative embodiment of the present invention is directed to a first storage system for use in a computer system including a first computer to be coupled to the first storage system, a second computer, and a second storage system coupled to the second computer, the second storage system including at least one storage device that stores a second plurality of logical volumes of data that are visible to and writable by the second computer, the computer system further including at least one communication path coupled between the first and second storage systems to transfer data between the first and second storage systems, the at least one communication path not passing through the first computer. The first storage system includes: at least one storage device that stores a first plurality of logical volumes of data that are visible to and writable by the first computer; and at least one write controller that updates the first plurality of logical volumes with data received from the first computer, the at least one write controller being further adapted to update at least one of the first plurality of logical volumes with data received from the second storage system over the at least one communication path.
Another illustrative embodiment of the present invention is directed to a first storage system for use in a computer system including a first computer, a second computer, a second storage system, and at least one communication path, wherein the first computer is coupled to the first storage system, wherein the second computer is coupled to the second storage system to permit the second computer to update a second set of data stored by the second storage system, and wherein the at least one communication path is coupled between the first and second storage systems to transfer data between the first and second storage systems, the at least one communication path not passing through the first computer. The first storage system includes: at least one storage device that stores a first set of data; and at least one write controller, coupled to the at least one storage device, to update at least one portion of the first set of data with data received both from the first computer and from the second storage system via the at least one communication path.
Another illustrative embodiment of the present invention is directed to a computer readable medium encoded with plurality of instruction for execution by at least one processor included in a first storage system. The first storage system being for use in a computer system including first and second computers and a second storage system, wherein the first storage system is to be coupled to the first computer to store data transferred from the first computer to the first storage system and the second storage system is to be coupled to the second computer to store data transferred from the second computer to the second storage system. The plurality of instructions, when executed by the at least one processor, cause the at least one processor to perform steps of: (A) updating a first logical volume of data stored on the first storage system with a first set of data transferred from the first computer to the first storage system; and(B) updating the first logical volume of data stored on the first storage system with a second set of data received from the second storage system, the second set of data being received via at least one communication path that does not pass through the first computer.
Another illustrative embodiment of the present invention is directed to a computer readable medium encoded with a plurality of instructions for execution by at least one processor included in a first storage system. The first storage system being for use in a computer system including first and second computers and a second storage system, wherein the first storage system is to be coupled to the first computer to store data transferred from the first computer to the first storage system and the second storage system is to be coupled to the second computer to store data transferred from the second computer to the second storage system. The plurality of instructions, when executed by the at least one processor, cause the at least one processor to perform steps of: (A) in response to a first logical volume of data stored on the first storage system being updated with a first set of data transferred from the first computer to the first storage system, causing the first set of data to be transmitted from the first storage system to the second storage system over at least one communication path that does not pass through either of the first and second computers; and (B) updating the first logical volume of data stored on the first storage system with a second set of data received from the second storage system, the second set of data being received via the at least one communication path.